package com.atguigu.spring.beans.relation;

import com.atguigu.spring.beans.autowire.Address;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("beans-relation.xml");

        Address address = (Address) ctx.getBean("address");
        System.out.println(address);
        Address address2 = (Address) ctx.getBean("address2");
        System.out.println(address2);
    }
}
